package mg.system.util;

public class MGMath
{

	public static int abs(int a)
	{
		return Math.abs(a);
	}

	public static boolean isIntersect(short[] rect, short[] rect2)
	{
		if (MGMath.abs((rect[0] + rect[2] / 2) - (rect2[0] + rect2[2] / 2)) < MGMath
				.abs((rect[2] + rect2[2]) / 2)
				|| MGMath.abs((rect[1] + rect[3] / 2)
						- (rect2[1] + rect2[3] / 2)) < MGMath
						.abs((rect2[3] + rect2[3]) / 2)) return true;
		else return false;
	}

}
